//@ts-ignore
import request from '@/utils/request';
//@ts-ignore
import {
  DelateShareRequestData,
  ResponseData,
  AddShareRequestData
} from "@/api/share/type";

/**
 * 分享接口集合
 */
enum API {
  SHARE__LIST_URL = '/share/list',
  ADD_SHARE__URL = '/share/add',
  DELETE_SHARE_URL = '/share/delete'
}

export const reqShareList = () =>
    request.post<any, ResponseData>(API.SHARE__LIST_URL)


export const reqAddShare = (data: AddShareRequestData) =>
    request.post<any, ResponseData>(API.ADD_SHARE__URL, data)

export const reqDelateShare = (data: DelateShareRequestData) =>
    request.post<any, ResponseData>(API.DELETE_SHARE_URL, data)






